<template>
  <div class="sipwer-wrapper">
    <swiper :options="swiperOption" ref="mySwiper" >
      <swiper-slide v-for="item of bannerList" :key="item.material_id">
        <img class="swiper-img" :src="item.img_url" :alt="item.img_url_color">
      </swiper-slide>
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
import 'swiper/dist/css/swiper.css';
import { swiper, swiperSlide } from 'vue-awesome-swiper'
export default {
  components: {
    swiper,
    swiperSlide
  },
  props: ['bannerList'],
  data() {
    return {
      swiperOption: {
        pagination: {
          el: '.swiper-pagination'
        },
        loop: true
      }
    }
  }
}
</script>

<style lang="scss" scoped>
  .sipwer-wrapper {
    height: 0;
    padding-bottom: 51%;
    background: #f2f2f2;
    .swiper-img {
      width: 100%;
    }
  }
</style>